package com.xuyiwei.mayi.service;

import com.xuyiwei.mayi.entity.User;
import com.xuyiwei.mayi.mapper2.UserMapper2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by xuyiwei on 2019/4/19.
 */
@Service
public class UserServiceImpl2 implements UserService2 {
    @Autowired
    private UserMapper2 userMapper2;

    @Override
    public List<User> findAll() {
        return userMapper2.findAll();
    }

    @Override
    public User findOne(Integer id) {
        return userMapper2.findOne(id);
    }

    @Override
    public void addOne(User user) {
        userMapper2.addOne(user);
    }

    @Override
    public void updateOne(User user) {
        userMapper2.updateOne(user);
    }

    @Override
    public void delOne(Integer id) {
        userMapper2.delOne(id);
    }
}
